import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import echarts from 'echarts'

// 导入全局css
import 'vant/lib/index.css'
// 导入自定义指令
import directives from '@/directives/index.js'
// 注册全局组件
import componentJs from '@/components/index.js'
// 引入公共样式
// 公共样式
import '@/style/comm.css'
import 'normalize.css' // 引入normalize
import filterJs from '@/filters/company.js'
Object.keys(filterJs).forEach(item => {
  Vue.filter(item, filterJs[item])
})
// 全局注册自定义指令
Object.keys(directives).forEach(item => {
  Vue.directive(item, directives[item])
})
Vue.prototype.$echarts = echarts

// 创建bus
Vue.prototype.$bus = new Vue()

Vue.use(componentJs)

Vue.use(Vant)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
